import 'package:json_annotation/json_annotation.dart';

part 'line_style.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class LineStyle {
  var color;
  var width;
  var type;

  var shadowBlur;
  var shadowColor;
  var shadowOffsetX;
  var shadowOffsetY;
  var opacity;

//legend有这些参数
  var dashOffset;
  var cap;
  var join;
  var miterLimit;
  var curveness;

  LineStyle(
      {this.color,
      this.width,
      this.type,
      this.shadowBlur,
      this.shadowColor,
      this.shadowOffsetX,
      this.shadowOffsetY,
      this.opacity,
      this.dashOffset,
      this.cap,
      this.join,
      this.miterLimit,
      this.curveness});

  factory LineStyle.fromJson(Map<String, dynamic> json) =>
      _$LineStyleFromJson(json);

  Map<String, dynamic> toJson() => _$LineStyleToJson(this);
}
